package com.hetao.assist;

import com.alibaba.dubbo.spring.boot.annotation.EnableDubboConfiguration;
import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;

/**
 * @author hetao
 */
@EnableDubboConfiguration
@SpringBootApplication
@MapperScan(basePackages = {"com.hetao.assist.dal.mapper"})
public class BootApplication {

	private static final Logger log = LoggerFactory.getLogger(BootApplication.class);

	public static void main(String[] args) {
		try {
			ApplicationContext ctx = SpringApplication.run(BootApplication.class, args);
			String[] activeProfiles = ctx.getEnvironment().getActiveProfiles();
			for (String profile : activeProfiles) {
				log.info("Spring Boot profile is:{}" , profile);
			}
		}catch (Exception e) {
			e.printStackTrace();
		}
	}

}
